package com.example.Service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.Service.LogService;
import com.example.dao.LogMapper;
import com.example.pojo.LogEntity;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, LogEntity> implements LogService {

    @Autowired
    private LogMapper logMapper;


    public PageInfo<LogEntity> selectAllLogs(Integer pageNum, Integer pageSize,String startTime,String endTime) {
        PageHelper.startPage(pageNum, pageSize);
        List<LogEntity> logEntityList = logMapper.selectAllLogs(startTime, endTime);
        return new PageInfo<>(logEntityList);
    }
}
